function str2display(para) {
    switch (para) {
        case undefined:
            return "";
        default:
            return para;
    }
}

function canFillHTML(power2vali, powerAttr, htmlStr) {
    if (canDo(power2vali, powerAttr)) {
        return htmlStr;
    }
    return "";
}

function canDo(power2vali, powerAttr) {
    if ((power2vali & powerAttr) == powerAttr) {
        return true;
    }
    return false;
}

function hideIdentityNo(input, f, e) {
    var frontLen = f || 3, endLen = e || 4;
    var len = input.length - frontLen - endLen;
    var xing = '';
    for (var i = 0; i < len; i++) {
        xing += '*';
    }
    return input.substring(0, frontLen) + xing + input.substring(input.length - endLen);
};

function getImages(who, id) {
    var id = String(id)
    if (id && id != '' && $(who)[0].src.indexOf("pic.png") > 0) {
        $.post("/common/images/", {id: id}, function (result) {
            if (result) {
                $(who).attr("src", result)
            }
        });
    }

}
